package com.googlecode.gwtbb.client.only.widget.form.entry;

import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.TextArea;
import com.googlecode.gwtbb.client.shared.validation.FieldId;

/**
 * @author Abraham Grief
 * @version $Id$
 * @since Jul 21, 2008
 */
public class LabeledTextAreaFormEntry extends LabeledFormEntry {
	private TextArea entryTextArea;

	public LabeledTextAreaFormEntry(FieldId fieldId, String defaultValue, int row, int col, String labelText, TextArea entryTextArea) {
		super(fieldId, defaultValue, row, col, labelText);
		this.entryTextArea = entryTextArea;
		clearValue();
	}

	public TextArea getEntryTextArea() {
		return entryTextArea;
	}

	public Widget getEntryWidget() {
		return entryTextArea;
	}

	public String getValue() {
		return entryTextArea.getText();
	}

	public void setValue(String value) {
		entryTextArea.setText(value);
	}
}